//
//  BRBaseNavController.m
//  BrezzeSaaS
//
//  Created by IOS on 2021/8/31.
//  Copyright © 2021 Brezze GWG. All rights reserved.
//

#import "BRBaseNavController.h"

@interface BRBaseNavController ()<QMUINavigationControllerDelegate>

@end

@implementation BRBaseNavController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
//    ExtendImplementationOfVoidMethodWithoutArguments([UINavigationController class], @selector(viewDidLoad), ^(UINavigationController *selfObject) {
//        selfObject.qmui_interactivePopGestureRecognizerDelegate = selfObject.interactivePopGestureRecognizer.delegate;
//        selfObject.interactivePopGestureRecognizer.delegate = (id<UIGestureRecognizerDelegate>)selfObject;
//    });
    
}

- (BOOL)forceEnableInteractivePopGestureRecognizer {
    return YES;
}

//- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
//    if (gestureRecognizer == self.interactivePopGestureRecognizer) {
//        BOOL canPopViewController = [self canPopViewController:self.topViewController byPopGesture:YES];
//        if (canPopViewController) {
//            if ([self.qmui_interactivePopGestureRecognizerDelegate respondsToSelector:_cmd]) {
//                return [self.qmui_interactivePopGestureRecognizerDelegate gestureRecognizerShouldBegin:gestureRecognizer];
//            } else {
//                return NO;
//            }
//        } else {
//            return NO;
//        }
//    }
//    return YES;
//}
//
//- (BOOL)_gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveEvent:(UIEvent *)event {
//    if (gestureRecognizer == self.interactivePopGestureRecognizer) {
//        NSObject <UIGestureRecognizerDelegate> *originGestureDelegate = self.qmui_interactivePopGestureRecognizerDelegate;
//        if ([originGestureDelegate respondsToSelector:_cmd]) {
//            BOOL originalValue = YES;
//            [originGestureDelegate qmui_performSelector:_cmd withPrimitiveReturnValue:&originalValue arguments:&gestureRecognizer, &event, nil];
//            if (!originalValue && [self shouldForceEnableInteractivePopGestureRecognizer]) {
//                return YES;
//            }
//            return originalValue;
//        }
//    }
//    return YES;
//}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
